import request from '@/utils/request'
// 查询采购信息列表
export function purchaseList(query) {
  return request({
    url: '/purchase/queryPageList',
    method: 'get',
    params: query
  })
}
// 获取采购信息详细信息
export function purchaseDetail(id) {
  return request({
    url: `/purchase/${id}`,
    method: 'get'
  })
}

// 新增采购信息
export function purchaseAdd(data) {
  return request({
    url: '/purchase/save',
    method: 'post',
    data: data
  })
}

// 修改采购信息
export function purchaseUpdate(data) {
  return request({
    url: '/purchase/update',
    method: 'post',
    data: data
  })
}

// 删除采购信息
export function purchaseDelete(ids) {
  return request({
    url: `/purchase/delete/${ids}`,
    method: 'post'
  })
}

// 查询车型库参数信息
export function queryParamList(query) {
  return request({
    url: `/car/carModel/queryParamList`,
    method: 'get',
    params: query
  })
}

// 余额支付通知列表数据
export function getNoticeBalancePayList(query) {
  return request({
    url: `/purchase/getNoticeBalancePayList`,
    method: 'get',
    params: query
  })
}

// 余额支付通知
export function noticeBalancePay(data) {
  return request({
    url: `/purchase/noticeBalancePay`,
    method: 'post',
    data: data
  })
}

// 获取供应商账户
export function supplierAccount(supplierId) {
  return request({
    url: `/supplier/supplier/account/${supplierId}`,
    method: 'get',
  })
}

// 根据车型id获取车300数据回显
export function recognitionModel(modelId) {
  return request({
    url: `/purchase/recognitionModel/${modelId}`,
    method: 'post',
  })
}

// 查询订单信息
export function toOrderDetail(orderNo) {
  return request({
    url: `/purchase/toOrderDetail/${orderNo}`,
    method: 'get',
  })
}

